import 'package:flutter_agent_terminal/generated/json/base/json_field.dart';
import 'package:flutter_agent_terminal/generated/json/selection_data_bean_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class SelectionDataBeanEntity {

	late int errno;
	late SelectionDataBeanData data;
  
  SelectionDataBeanEntity();

  factory SelectionDataBeanEntity.fromJson(Map<String, dynamic> json) => $SelectionDataBeanEntityFromJson(json);

  Map<String, dynamic> toJson() => $SelectionDataBeanEntityToJson(this);

  SelectionDataBeanEntity copyWith({int? errno, SelectionDataBeanData? data}) {
      return SelectionDataBeanEntity()..errno= errno ?? this.errno
			..data= data ?? this.data;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelectionDataBeanData {

	late List<SelectionDataBeanDataList> list;
  
  SelectionDataBeanData();

  factory SelectionDataBeanData.fromJson(Map<String, dynamic> json) => $SelectionDataBeanDataFromJson(json);

  Map<String, dynamic> toJson() => $SelectionDataBeanDataToJson(this);

  SelectionDataBeanData copyWith({List<SelectionDataBeanDataList>? list}) {
      return SelectionDataBeanData()..list= list ?? this.list;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelectionDataBeanDataList {

	late String title;
	late String key;
	late String type;
	late String defaultValue;
	late String value;
	late List<SelectionDataBeanDataListChildren> children;
  
  SelectionDataBeanDataList();

  factory SelectionDataBeanDataList.fromJson(Map<String, dynamic> json) => $SelectionDataBeanDataListFromJson(json);

  Map<String, dynamic> toJson() => $SelectionDataBeanDataListToJson(this);

  SelectionDataBeanDataList copyWith({String? title, String? key, String? type, String? defaultValue, String? value, List<SelectionDataBeanDataListChildren>? children}) {
      return SelectionDataBeanDataList()..title= title ?? this.title
			..key= key ?? this.key
			..type= type ?? this.type
			..defaultValue= defaultValue ?? this.defaultValue
			..value= value ?? this.value
			..children= children ?? this.children;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelectionDataBeanDataListChildren {

	late String title;
	late String key;
	late String type;
	late String defaultValue;
	late String value;
  
  SelectionDataBeanDataListChildren();

  factory SelectionDataBeanDataListChildren.fromJson(Map<String, dynamic> json) => $SelectionDataBeanDataListChildrenFromJson(json);

  Map<String, dynamic> toJson() => $SelectionDataBeanDataListChildrenToJson(this);

  SelectionDataBeanDataListChildren copyWith({String? title, String? key, String? type, String? defaultValue, String? value}) {
      return SelectionDataBeanDataListChildren()..title= title ?? this.title
			..key= key ?? this.key
			..type= type ?? this.type
			..defaultValue= defaultValue ?? this.defaultValue
			..value= value ?? this.value;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}